Data logging

Data can be logged and stored to HMI memory. Data logging allows you to store the values of a group of tags all at the same time to a buffer. Data logging can be triggered by a timer or by a dedicated tag. Logged data can be exported to a .csv file or displayed using the historical trend widget. Logged data can be saved locally on a USB device or SD card, or on any available custom network folder.

WARNING: The operation with removable memory devices (USB Flash drives, SD memory cards) containing a very large number of files may result in a decrease of system performance.

WARNING: The max number of files inside a SD memory card depends on the type of formatting (e.g. FAT32 max 65535 files; FAT max 512 files).

WARNING: Flash cards support a limited number of write operations. We suggest to use only good quality memory cards; in the case your application use intensively the memory card consider a regular substitution of the memory card.

WARNING: If the data/time is moved back, the samples with invalid date/time are removed from the trend buffer. When system detects that data/time is invalid (e.g. battery low), a popup is shown to advise the user and the date/time of the last sample is used to avoid losing data.

Storage is based on trend buffers. Trend buffers are organized as a FIFO queue: when the buffer is full, the oldest values are discarded unless you configure your trend to create a backup copy of the buffer.

Adding a trend buffer

Path: ProjectView> Config > double-click Trends

  1. Click Add to add a new buffer.
  2. Click + next to each trend buffer to display all configuration parameters.

 

Toolbar Element Description
Add a trend that will be sampled from the HMI device.

Add a trend that will be managed and sampled from the external device, instead of from the HMI device. You need a device that supports this feature to use it (e.g. BACnet devices). The parameters depend on the used device, refer to the manual of the selected device.

Remove the select trend.

Offers the ability to customize the labels that appear in the trend dump header and trend table widgets.

  • Timestamp
  • Date
  • Time
  • Quality

The below placeholders can be used:

  • " \n " (space + \n + space) can be used to split the label into two or more lines
  • [TagName] (tag name enclosed in square brackets) can be used to display a tag value
Copy the selected trend
Paste the selected trend
Export selected trends to file
Import trends from file
Total memory Space

Memory used by the defined trend buffers.

Trend Header Description

Trend Name

Name of the trend collection (set of tags sampled at the same time)
Active

When enabled, the trend runs by default at system startup.

Note: Trends cannot be activated at runtime.

Source

List of the tags sampled by the trend.

Import from file Import and overwrite trend parameters from a file (exported previously).
Trend Element Description
Number of Samples Trend buffer size (see "Number of Samples" for additional information)
Sampling Time

Sampling interval.

Note that instead of a constant, you can use a Tag to define/change the sample time at runtime. When sample time is 0, or negative, sampling is suspended.

Time

Time unit for the sample time. Could be 1 second (default) or 1/10 seconds

Be aware that increasing the sampling rate could impact global HMI device performances.

Timestamp

When checked, samples are stored using the timestamp provided from the remote device.

Available only:

  • for device’s protocols that support this feature (OPC UA Client and BACnet)
  • when trend buffer is configured to with a single tag
Trigger

Tag triggering the sample.

If used, when the value of this tag changes, a sample is collected.

Note: Trigger and Source can refer to the same tag.

Storage Device Where trend buffer data will be stored.
Backup Archive

If Save a copy when full option is enabled, a backup copy of the buffer data is created before it is overwritten by newer data.

.csv Backup data using text CSV format.
Path

Where trend buffer data will be copied.

The below wild cards are supported

  • %n = Trend name
  • %y = Year
  • %M = Month
  • %d = Day
  • %h = Hour
  • %m = Minutes
  • %s = Seconds
Select Fields

Fields that will be inside the dump file

Note that you can use a string tag to define the fields to dump at runtime.

Select Curves

Curves that will be inside the dump file

Note that you can use a string tag to define the fields to dump at runtime.

Time Spec

Timestamp of samples

  • Local
    Use the time of the HMI device where the project is running
  • Global
    Use global time (GMT)
Data Format Time and Date format. Placeholders can be used (see "Time and Date placeholders")
Language Language to use

Sampling Filter / Trigger Filter

This parameter allows to specify a dynamic filter if required.

When sampling is done on time basis the offset is applied to the sampled Tag value. If the new value exceeds the specified limits the new value is considered valid and stored, otherwise the new record will retain the previous saved value.

When sampling is done on trigger the offset is applied to the trigger Tag value. If the trigger Tag value change exceeds the specified limits a new sample is taken and stored, otherwise no sampling will be done.

Use the buttons on the toolbar to add, remove or move tags to be sampled

Samples Description
Name Trend name
Title

Title that has to appears inside the trend table or the trend dump.

  • The placeholder " \n " (space + \n + space) can be used to split the label into two or more lines
  • The placeholder [TagName] (tag name enclosed in square brackets) can be used to display a tag value

    Example:

    "Temperature ([UnitaDiMisura])" will be shown as "Temperature (°C)" when the tag UnitaDiMisura = "°C"

Tag

Tag that must be sampled

Tags string are supported until 8 bytes. If tag size is greater than 8 bytes, only the first 8 bytes are stored in trend. Unicode chars are not supported.

Format

Display format to use. Note that even the custom format can be used (see "Custom Formats").

Comment You can write whatever you want here
Tags Wizard

Tag Wizard Button will allow you to automatically fill in the tag names in the trend table.

You can use the placeholders $(Trend) and $(Name) in the regular expression to search the available tags. When you press "Fill" or "Replace" buttons the matching tags will be added to the trend table

Number of Samples

The number of samples that you can have is dependent on the memory size reserved for trend buffers and from the size of each sample.

Number of available samples = Available Memory (bytes) / Size of sample (bytes)

Where the size of each sample is dependent on how many tags are used and can be calculated using the below formula:

Size of sample (bytes) = TAGS*9 + 11

You are free to use the entire available memory for a unique trend buffer or split the available memory over several trends.

See also: